home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 408_01 / getopt.h < prev    next >
Text File  |  1991-11-02  |  1KB  |  32 lines

  1. /*
  2. **    @(#)getopt.h    2.2 (smail) 1/26/87
  3. */
  4.  
  5. /*
  6.  * Here's something you've all been waiting for:  the AT&T public domain
  7.  * source for getopt(3).  It is the code which was given out at the 1985
  8.  * UNIFORUM conference in Dallas.  I obtained it by electronic mail
  9.  * directly from AT&T.  The people there assure me that it is indeed
  10.  * in the public domain.
  11.  *
  12.  * There is no manual page.  That is because the one they gave out at
  13.  * UNIFORUM was slightly different from the current System V Release 2
  14.  * manual page.  The difference apparently involved a note about the
  15.  * famous rules 5 and 6, recommending using white space between an option
  16.  * and its first argument, and not grouping options that have arguments.
  17.  * Getopt itself is currently lenient about both of these things White
  18.  * space is allowed, but not mandatory, and the last option in a group can
  19.  * have an argument.  That particular version of the man page evidently
  20.  * has no official existence, and my source at AT&T did not send a copy.
  21.  * The current SVR2 man page reflects the actual behavor of this getopt.
  22.  * However, I am not about to post a copy of anything licensed by AT&T.
  23.  *
  24.  */
  25.  
  26. extern int opterr;
  27. extern int optind;
  28. extern int optopt;
  29. extern char *optarg;
  30.  
  31. extern int getopt(int argc, char **argv, char *opts);
  32.